/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication1;
import com.ditt.outils.*;
/**
 *
 * @author attobra
 */
public class TestFigure {
    
    public static void main (String[] args){
        
       Cercle cercle = new Cercle(4.5f, "rouge"); 
       Rectangle rectangle = new Rectangle(3f,4f,"vert");
       javax.swing.JOptionPane.showMessageDialog(null, comparaisonFigure(rectangle,cercle));
    }
    public static String comparaisonFigure(Figure figure1,Figure figure2){
        if(figure1.getSurface()>figure2.getSurface()){ 
            return figure1 + " est superieur à " + figure2;
        }else if(figure1.getSurface()<figure2.getSurface()){
            
            return figure2 + " est superieur à " + figure1;
        }else
            return figure1 +" et " + figure2 + " ont les mêmes surfaces ";
    }
}   
